package cn.lingyangwl.agile.system.model.entity;

import cn.lingyangwl.agile.tenant.core.DataIsolation;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * 用户和角色关联 sys_user_role
 * 
 * @author shenguangyang
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("sys_user_role")
@DataIsolation(filterTenant = true, deleteUserData = true, tableName = "sys_user_role")
public class SysUserRole {
    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 角色ID
     */
    private Long roleId;

    /**
     * 租户id
     */
    private Long tenantId;

    /**
     * 角色编码
     */
    private String roleCode;

    public static LambdaQueryWrapper<SysUserRole> lqw() {
        return Wrappers.lambdaQuery();
    }
}
